
package com.sm.shoplook.domain.suit;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

@Table(name = "t_suit_scan_record")
public class SuitScanRecord implements Serializable {

	@Id
	private Integer id;
	/**
	 * 套装ID
	 */
	@Column(name = "suit_id")
	private Integer suitId;
	/**
	 * 会员ID
	 */
	@Column(name = "customer_id")
	private Integer customerId;
	/**
	 * 1、收藏； 2、浏览
	 */
	private Integer type;
	@Column(name = "create_time")
	private Date createTime;
	private static final long serialVersionUID = 1L;

	/**
	 * @return id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * @param id
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * 获取套装ID
	 * @return suit_id - 套装ID
	 */
	public Integer getSuitId() {
		return suitId;
	}

	/**
	 * 设置套装ID
	 * @param suitId 套装ID
	 */
	public void setSuitId(Integer suitId) {
		this.suitId = suitId;
	}

	/**
	 * 获取会员ID
	 * @return customer_id - 会员ID
	 */
	public Integer getCustomerId() {
		return customerId;
	}

	/**
	 * 设置会员ID
	 * @param customerId 会员ID
	 */
	public void setCustomerId(Integer customerId) {
		this.customerId = customerId;
	}

	/**
	 * 获取1、收藏； 2、浏览
	 * @return type - 1、收藏； 2、浏览
	 */
	public Integer getType() {
		return type;
	}

	/**
	 * 设置1、收藏； 2、浏览
	 * @param type 1、收藏； 2、浏览
	 */
	public void setType(Integer type) {
		this.type = type;
	}

	/**
	 * @return create_time
	 */
	public Date getCreateTime() {
		return createTime;
	}

	/**
	 * @param createTime
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(getClass().getSimpleName());
		sb.append(" [");
		sb.append("Hash = ").append(hashCode());
		sb.append(", id=").append(id);
		sb.append(", suitId=").append(suitId);
		sb.append(", customerId=").append(customerId);
		sb.append(", type=").append(type);
		sb.append(", createTime=").append(createTime);
		sb.append("]");
		return sb.toString();
	}

	@Override
	public boolean equals(Object that) {
		if (this == that) {
			return true;
		}
		if (that == null) {
			return false;
		}
		if (getClass() != that.getClass()) {
			return false;
		}
		SuitScanRecord other = (SuitScanRecord) that;
		return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
				&& (this.getSuitId() == null ? other.getSuitId() == null : this.getSuitId().equals(other.getSuitId()))
				&& (this.getCustomerId() == null ? other.getCustomerId() == null
						: this.getCustomerId().equals(other.getCustomerId()))
				&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
				&& (this.getCreateTime() == null ? other.getCreateTime() == null
						: this.getCreateTime().equals(other.getCreateTime()));
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
		result = prime * result + ((getSuitId() == null) ? 0 : getSuitId().hashCode());
		result = prime * result + ((getCustomerId() == null) ? 0 : getCustomerId().hashCode());
		result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
		result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
		return result;
	}
}
